package cn.niit.service.impl;

import cn.niit.dao.UserDao;
import cn.niit.dao.impl.UserDaoImpl;
import cn.niit.service.UserService;

public class UserServiceImpl implements UserService {
    //private UserDao userDao = new UserDaoOracleImpl();
    private UserDao userDao;



    public UserServiceImpl() {
    }

    //利用set实现值的动态注入
    public void setUserDao(UserDao userDao){
        this.userDao = userDao;
    }

    /**
     * 添加用户
     * @return
     */
    public int addUser(){
        System.out.println("[UserServiceImpl]处理用户添加相关逻辑业务！！！");
        return userDao.addUser();
    }
}
